Drop deprecated style context api
authorMatthias Clasen <mclasen@redhat.com>
Sun, 31 Mar 2019 19:04:39 +0000 (15:04 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 31 Mar 2019 19:35:20 +0000 (15:35 -0400)
docs/reference/gtk/gtk4-sections.txt
gtk/gtkstylecontext.c
gtk/gtkstylecontext.h

index 4e5e6ea044af9d071a1531a666c89a6c249eb23c..167a16ee62cc952911f11d6c9cbc8dfc6928eb9b 100644 (file)
@@ -5055,8 +5055,6 @@ gtk_style_context_get_state
 gtk_style_context_get_valist
 gtk_style_context_get_section
 gtk_style_context_get_color
-gtk_style_context_get_background_color
-gtk_style_context_get_border_color
 gtk_style_context_get_border
 gtk_style_context_get_padding
 gtk_style_context_get_margin
index 81384cc0c98c28e16446dbb9eb8222d2610848ef..4e0c953e2c324777ee23fb6b02a5ece81d81e59d 100644 (file)
@@ -1431,67 +1431,6 @@ gtk_style_context_get_color (GtkStyleContext *context,
   gdk_rgba_free (c);
 }
 
-/**
- * gtk_style_context_get_background_color:
- * @context: a #GtkStyleContext
- * @color: (out): return value for the background color
- *
- * Gets the background color for a given state.
- *
- * This function is far less useful than it seems, and it should not be used in
- * newly written code. CSS has no concept of "background color", as a background
- * can be an image, or a gradient, or any other pattern including solid colors.
- *
- * The only reason why you would call gtk_style_context_get_background_color() is
- * to use the returned value to draw the background with it; the correct way to
- * achieve this result is to use gtk_render_background() instead, along with CSS
- * style classes to modify the color to be rendered.
- *
- * Deprecated: 3.16: Use gtk_render_background() instead.
- **/
-void
-gtk_style_context_get_background_color (GtkStyleContext *context,
-                                        GdkRGBA         *color)
-{
-  GdkRGBA *c;
-
-  g_return_if_fail (color != NULL);
-  g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
-
-  gtk_style_context_get (context,
-                         "background-color", &c,
-                         NULL);
-
-  *color = *c;
-  gdk_rgba_free (c);
-}
-
-/**
- * gtk_style_context_get_border_color:
- * @context: a #GtkStyleContext
- * @color: (out): return value for the border color
- *
- * Gets the border color for a given state.
- *
- * Deprecated: 3.16: Use gtk_render_frame() instead.
- **/
-void
-gtk_style_context_get_border_color (GtkStyleContext *context,
-                                    GdkRGBA         *color)
-{
-  GdkRGBA *c;
-
-  g_return_if_fail (color != NULL);
-  g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
-
-  gtk_style_context_get (context,
-                         "border-color", &c,
-                         NULL);
-
-  *color = *c;
-  gdk_rgba_free (c);
-}
-
 /**
  * gtk_style_context_get_border:
  * @context: a #GtkStyleContext
index 13de1f1035fda3f5a3950cc6fb599f93d6b791c4..f489db91525bce5fd331d75e5d45eb3ece57c4d5 100644 (file)
@@ -1026,13 +1026,6 @@ gboolean gtk_style_context_lookup_color (GtkStyleContext *context,
 GDK_AVAILABLE_IN_ALL
 void gtk_style_context_get_color            (GtkStyleContext *context,
                                              GdkRGBA         *color);
-GDK_DEPRECATED_FOR(gtk_render_background)
-void gtk_style_context_get_background_color (GtkStyleContext *context,
-                                             GdkRGBA         *color);
-GDK_DEPRECATED_FOR(gtk_render_frame)
-void gtk_style_context_get_border_color     (GtkStyleContext *context,
-                                             GdkRGBA         *color);
-
 GDK_AVAILABLE_IN_ALL
 void gtk_style_context_get_border           (GtkStyleContext *context,
                                              GtkBorder       *border);